package 
{
	import flash.display.Sprite;
	import flash.events.Event;
	import org.flixel.*;
	import com.GCTutorial;
	import flash.system.Security;
	import flash.system.SecurityDomain;
	
	/*
	Create the swf container for the game.
	*/
	[SWF(width="760", height="600", backgroundColor="#FFFFFF")]
	[Frame(factoryClass="GCPreLoader")]
	
	/**
	 * The main class which starts up the game.
	 * @author 
	 */
	public class GCMain extends FlxGame
	{
		
		public function GCMain():void 
		{
			Security.allowDomain("newgrounds.com");
			Security.allowDomain("ungrounded.net");
			Security.allowDomain("ngfiles.com");
			Security.allowDomain("*");
			
			Security.loadPolicyFile("http://128.95.1.13:8080/gamescapstone/crossdomain.xml");
			
			super(760, 600, GCLoginState, 1);
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
		}
		
	}
	
}